The present invention relates to optical encoders for pointing devices, and in particular to photosensor circuitry for such optical encoders.
Pointing devices, such as mice and trackballs, are well known peripherals for personal computers and workstations. When the ball is moved on such a mouse or trackball, an encoder wheel biased against the ball moves as well, rotating the slots of the encoder wheel, which are positioned between the light emitter and detector. The light detector, by detecting the alternating periods of darkness and lightness, can provide a signal to the computer indicating the amount and direction of movement of the ball. Such an optical encoder can also be connected to a roller used on a mouse for scrolling and other movements.
One configuration for such an optical sensor is shown in a patent issued to the assignee of this application, U.S. Pat. No. 5,680,157, entitled xe2x80x9cPointing Device With Differential Optomechanical Sensingxe2x80x9d. This patent provides a plurality of photosensors to provide differential detection, with the differential signals being detected by comparators integrated on the same chip as the photosensors. The comparator outputs are provided to latches and then provided on separate output pins for a processor circuit that reads the sensors and provides signals to a computer. The present invention improves on the photosensor circuitry of this patent, and accordingly U.S. Pat. No. 5,680,157 is hereby incorporated herein by reference. A disadvantage of the device set forth in the above patent is the need for an extra pin, providing a total of four pins for the photosensor chip: pins for power and ground and two pins for the different comparator outputs. Other, non-differential sensors require only 3 pins. It would be desirable to provide a three pin configuration of a differential sensor to reduce cost.
Examples of semiconductor devices which use a single pin for both input and output are set forth in Dallas Semiconductor U.S. Pat. Nos. 5,210,846 and 5,809,519.
The present invention provides a sensor for sensing movement of an encoder. At least two sensors are mounted adjacent the encoder. Each of the sensors provides an output corresponding to the amount of movement. A pair of comparators are connected to the sensors to provide two signal outputs. The comparator outputs are then provided to a digital encoding circuit which encodes the signals as a multi-bit serial value on a single output line. The use of the single output line eliminates the extra output pin of the prior art, enabling a three pin package to be used. A pin is also saved on the receiver side (typically a microprocessor).
In one embodiment, an optical sensor is used for sensing light corresponding to the movement of an encoder. At least two photosensors are mounted on a side of the encoder opposite a light emitter. Each of the photosensors provides an output corresponding to the amount of light impinging on it. A pair of comparators are connected to the photosensors. In one embodiment, four photosensors are used to provide two differential signal outputs, with each of the comparators being connected to two of the photosensors.
In a preferred embodiment, the output line also has an input buffer which is used to clock the digital encoding circuit in response to a signal provided by the processor. The processor provides the control signal in synchronization with a pulsing of the light emitter. The digital encoding circuit self-resets to an initialized value upon the detection of a change in the sensor signal, without any control needed from the processor.
Additionally, the optical sensor preferably has an output buffer connected between the digital encoding circuit and the output line. The output buffer is designed with a limited drive capability so that the signal from the external processor to the input buffer will override the output buffer signal, allowing a control signal to be provided on the same line, even though the output buffer, providing an output signal, is coupled to it. Thus, the present invention essentially allows, in this embodiment, the output signal to be constantly provided, but to be overridden by a control signal to update the output signal in conjunction with a new pulsing of the light emitter.
In a preferred embodiment, the encoding circuit consists of a rotary encoder having inputs coupled to the comparators and providing parallel outputs. The parallel to serial converter interface circuit is connected between the rotary encoder and the output buffer.
For a further understanding of the nature and the advantages of the invention, reference should be made to the following description taken into conjunction with the accompanying drawings.